]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dash: Make sure item labels are only destroyed once
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Tue, 5 Dec 2017 01:45:35 +0000 (20:45 -0500)
committerMarco Trevisan (Treviño) <mail@3v1n0.net>
Tue, 5 Dec 2017 23:06:58 +0000 (18:06 -0500)
Labels are currently destroyed from both animateOutAndDestroy()
and destroy(), which now (rightfully) triggers a gjs warning. As
the label is created unconditionally since commit 36e5ae4a250,
mirror that and always release it in destroy() and hide it
elsewhere.

https://bugzilla.gnome.org/show_bug.cgi?id=791233

js/ui/dash.js

index 0c89545a2e6b262588c4991b4736d03d885e8b93..b89040bb6e396e3ef69cd1abd153400b16b0e7ff 100644 (file)
@@ -178,15 +178,12 @@ var DashItemContainer = new Lang.Class({
     },
 
     destroy: function() {
-        if (this.label)
-            this.label.destroy();
-
+        this.label.destroy();
         this.parent();
     },
 
     animateOutAndDestroy: function() {
-        if (this.label)
-            this.label.destroy();
+        this.label.hide();
 
         if (this.child == null) {
             this.destroy();